<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>gj frame example--person manager</title>
		<jsp:include flush="true" page="/jsps/inc/head.jsp"></jsp:include>
		<script type="text/javascript">
	$("document").ready(function(){
		$("#queryBtn").click(function(){
			$("#result").updateHTML({formId:"queryForm",openWaitBar:true});
		});
		
		$("#addBtn").click(function(){
			var url = "${base}/person!edit?flag=1";
			Cms.ajaxWin(url,600,150,"person-->add");			
		});
		
	});	
	var edit = function(id){
		var url = "${base}/person!edit?flag=2&id="+id;
		Cms.ajaxWin(url,600,150,"person-->edit");
	};
	var del = function(id){
		var url = "${base}/person!del?id="+id;
		$.post(url,function(data){
			Cms.alert("删除成功",function(){
				$("#queryBtn").click();
			});
		});
		
	}
		</script>
	</head>
	<body>
		<div id="go"></div>
		<div>
			<form action="${base }/person!list" method="post" id="queryForm">
				<table align="center" width="90%">
					<tbody>
						<tr>
							<th>
								name:
							</th>
							<td>
								<input type="text" name="name" id="id" />
							</td>
							<th>
								tel:
							</th>
							<td>
								<input type="text" name="tel" id="id" />
							</td>
					</tbody>
					<tfoot>
						<tr>
							<td colspan="4" align="center" style="text-align: center;">
								<input type="button" value="query" id="queryBtn"/>
								&nbsp;
								<button id="addBtn">add</button>
							</td>
						</tr>
					</tfoot>
				</table>
			</form>
		</div>
		<div id="result" align="center"></div>
	</body>
</html>
